package com.nuanshui.heatedloan.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.nuanshui.heatedloan.dal.BaseEntityImpl;
import com.nuanshui.heatedloan.enums.FileBelong;

import java.util.Date;


public class Image extends BaseEntityImpl {

	private static final long serialVersionUID = 1L;

	private String key;

	private String name; // 文件名

	private Integer size;

	private Integer width;

	private Integer height;
	
	private Double cropX;
	
	private Double cropY;
	
	private Double cropWidth;
	
	private Double cropHeight;

	@JsonIgnore
	@JSONField(serialize=false)
	private String suffix;

	@JsonIgnore
	@JSONField(serialize=false)
	private String imageAve;//图片主色调

	@JsonIgnore
	@JSONField(serialize=false)
	private Boolean archive = false;

	@JsonIgnore
	@JSONField(serialize=false)
	private FileBelong belong;
	
	private String  imgUrl;

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getSize() {
		return size;
	}

	public void setSize(Integer size) {
		this.size = size;
	}

	public Integer getWidth() {
		return width;
	}

	public void setWidth(Integer width) {
		this.width = width;
	}

	public Integer getHeight() {
		return height;
	}

	public void setHeight(Integer height) {
		this.height = height;
	}

	public Double getCropX() {
		return cropX;
	}

	public void setCropX(Double cropX) {
		this.cropX = cropX;
	}

	public Double getCropY() {
		return cropY;
	}

	public void setCropY(Double cropY) {
		this.cropY = cropY;
	}

	public Double getCropWidth() {
		return cropWidth;
	}

	public void setCropWidth(Double cropWidth) {
		this.cropWidth = cropWidth;
	}

	public Double getCropHeight() {
		return cropHeight;
	}

	public void setCropHeight(Double cropHeight) {
		this.cropHeight = cropHeight;
	}

	public String getSuffix() {
		return suffix;
	}

	public void setSuffix(String suffix) {
		this.suffix = suffix;
	}

	public Boolean getArchive() {
		return archive;
	}

	public void setArchive(Boolean archive) {
		this.archive = archive;
	}

	public FileBelong getBelong() {
		return belong;
	}

	public void setBelong(FileBelong belong) {
		this.belong = belong;
	}

	public String getImageAve() {
		return imageAve;
	}

	public void setImageAve(String imageAve) {
		this.imageAve = imageAve;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	@Override
	public String toString() {
		return "Image{" +
				"key='" + key + '\'' +
				", name='" + name + '\'' +
				", size=" + size +
				", width=" + width +
				", height=" + height +
				", cropX=" + cropX +
				", cropY=" + cropY +
				", cropWidth=" + cropWidth +
				", cropHeight=" + cropHeight +
				", suffix='" + suffix + '\'' +
				", imageAve='" + imageAve + '\'' +
				", archive=" + archive +
				", belong=" + belong +
				", imgUrl='" + imgUrl + '\'' +
				'}';
	}
}
